/*
 * lab11E1 - using exec
 */
#include <stdlib.h>
#include <unistd.h>
#include <stdio.h>
#include <sys/types.h>

int main(int argc, char* argv[]){
   int status =0;
   int pid_of_child = fork();
   if ( pid_of_child != 0 ) {
       /* parent code */
       printf("%s: Parent\n", argv[0] );
   } else {
       /* child code */
       printf("%s: Child will execute ls\n", argv[0] );
       execl( "/bin/ls" , "ls", "-l", NULL );
       exit( 0 );
   }
   wait(&status);
}
